extends "../aierdeliqi-3/aierdeliqi-3.gd"

var baseId = ""
var upText1 = "重力陷阱额外减20点机动"
var upText2 = "昏睡红茶作用目标+2"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("<先手>每6秒，随机使2名敌方单位陷入<沉睡>，持续5秒", "昏睡红茶", "sleepyTea", 6)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "sleepyTea":
		sleepyTea()
var p4 = 2
func sleepyTea():
	var chas = getAllChas(1)
	chas.shuffle()
	for i in range(p4):
		if i >= chas.size():break
		if chas[i].hasBuff("b_chenShui"):continue
		chas[i].addBuff(buff.b_chenShui.new(5))

func _onBattleStart():
	._onBattleStart()
	sleepyTea()

func upgrade():
	.upgrade()
	if upgraded == 2:
		p4 = 4	
